home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-03-01 | 1.2 KB | 30 lines | [TEXT/KAHL] |
- /*SATGridToolbox*/
- /**/
- /* Routines for SAT-based games with a game world defined by a grid.*/
- /* Note that this is the "Oxyd"-style world, where movement isn't contrained to the grid,*/
- /* but obstacles etc are defined by it. It is NOT ment for strict grid movement, as in PacMan!*/
- /**/
- /* Limitations and assumptions:*/
- /* • Your grid is defined in the unit SATGridStubs.*/
- /* • All free space grid values are smaller than the blocked ones. (Specified by kFreeSpace.) */
- /* • Sprites should not be bigger (wider/higher) than the grid spaces. (Sprites only check with the*/
- /* corners of the hotRects, which mens that a small grid obstacle could pass right through it!)*/
-
- // You need to make a copy of SATGridStubs.p, edit it as appropriate and include in
- // the same project. Also, SATGridToolbox.p needs to be included, as source-code, not
- // as a library.
-
- #include <SAT.h>
- #include <SATToolbox.h>
-
- // If you change GridSpaceType in SATGridStubs, change this typedef too!
- typedef short GridSpaceType;
-
- pascal void MoveSpriteInGrid(FixSpritePtr theSprite);
- pascal GridSpaceType Pt2GridValue(Point p);
- pascal void LoadGrid(short resNum);
- pascal void DrawAllTiles();
- pascal Boolean PtInGrid(Point p);
- pascal void GridTest(FixSpritePtr theSprite);
-
-